﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace University.Workshop.Presenters.FeesAndFines.Read
{
    public class PresenterReadFees
    {
        public IReadFeesView view;
        public Model.FeesAndFines fees;

        public PresenterReadFees(IReadFeesView view, Model.FeesAndFines f)
        {
            this.view = view;
            this.fees = new Model.FeesAndFines()
            {
                id = f.id,
                Charge = f.Charge,
                NewConection = f.NewConection,
                Reconnection = f.Reconnection,
                BaseRate = f.BaseRate,
                NewMember = f.NewMember,
                MonthlyContribution = f.MonthlyContribution,
                NonPayment = f.NonPayment,
                MeterViolation = f.MeterViolation,
                EffectiveDate = f.EffectiveDate
            };
        }

        public void LoadDataToView()
        {
            view.Charge = fees.Charge;
            view.NewConnection = fees.NewConection;
            view.Reconnection = fees.Reconnection;
            view.BaseRate = fees.BaseRate;
            view.NewMember = fees.NewMember;
            view.MonthlyContribution = fees.MonthlyContribution;
            view.NonPayment = fees.NonPayment;
            view.MeterViolation = fees.MeterViolation;
            view.EffectiveDate = fees.EffectiveDate;
        }
    }
}
